package com.mf.model.vo;

import java.io.Serializable;
import com.mf.validation.ValidGroup;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

/**
 * VO
 */
@Data
@Accessors(chain = true)
@ToString
public class RegisterVo implements Serializable {
    private static final long serialVersionUID = 207586384800110013L;

    /**
     * ID，更新时传入，添加时不传
     *
     * @mock 1010101
     */
    @NotNull(groups = {ValidGroup.Crud.Update.class, ValidGroup.Crud.Delete.class})
    @Null(groups = ValidGroup.Crud.Create.class)
    private Long id;


    /**
     * 姓名
     */
    @NotBlank(groups = ValidGroup.Crud.Create.class, message = "名字不能为空")
    private String name;


    /**
     * 性别 1 男 2 女
     */
    private Byte six;


    /**
     * 工作单位
     */
    @NotBlank(groups = ValidGroup.Crud.Create.class, message = "工作单位不能为空")
    private String workUnit;


    /**
     * 参赛项目
     */
    @NotBlank(groups = ValidGroup.Crud.Create.class, message = "请填写参赛项目")
    private String entries;

    /**
     * 图像
     */
    @NotBlank(groups = ValidGroup.Crud.Create.class, message = "请上传证件照")
    private String photo;

    /**
     * 身份证
     */
    @Length(max = 18, groups = ValidGroup.Crud.Create.class, message = "身份证号码不正确")
    private String idCard;


    /**
     * 组别
     */
    private String group;

}

